package com.example.motion.service.impl;

import com.example.motion.dao.UserMapper;
import com.example.motion.model.User;
import com.example.motion.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findUserByOpenid(String openid) {
        return userMapper.findUserByOpenid(openid);
    }

    @Override
    public User findUserByPoliceInfo(String name, String officeCode) {
        return userMapper.findUserByPoliceInfo(name, officeCode);
    }

    @Override
    public void updateOpenid(User user) {
        userMapper.updateOpenid(user);
    }
}
